<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<%@include file="/map/head.jsp" %>

<div id = "right">
<div id="panorama" style="width: 100%;height: 100%"></div>
	<div id="result" style="width: 100%;font-size: 15px">
		<button id="setPanoramaByLocation">按经纬度展示全景</button><button id="setPanoramaById">按全景Id展示全景</button>
	</div>
	</div>
</body>
</html>
<script type="text/javascript"> 
	var map = new BMap.Map('panorama');
	map.centerAndZoom(new BMap.Point(120.305456, 31.570037), 12);
	map.addTileLayer(new BMap.PanoramaCoverageLayer());

	var panorama = new BMap.Panorama('panorama'); 
	panorama.setPov({heading: -40, pitch: 6});
	document.getElementById("setPanoramaByLocation").onclick = function(){ 
		panorama.setPosition(new BMap.Point(120.320032, 31.589666)); //根据经纬度坐标展示全景图		
	};
	document.getElementById("setPanoramaById").onclick = function(){ 
		panorama.setId('0100010000130501122416015Z1');//根据全景id展示全景图
	};
</script>
